﻿using BCCommon.Extensions;
using BCCommon.OAEnums;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCDto.OA.Notification.NotificationRecord
{
    /// <summary>
    /// OA系统通知记录
    /// </summary>
	public class NotificationRecordDto
    {
        /// <summary>
        /// OA系统通知记录Id
        /// </summary>		
        public long NotificationRecordId { get; set; }
        /// <summary>
        /// 标题
        /// </summary>		
        public string Title { get; set; }
        /// <summary>
        /// 内容
        /// </summary>		
        public string Content { get; set; }
        /// <summary>
        /// 相关类型（业务，任务）
        /// </summary>		
        public OARelatedType RelatedType { get; set; }
        /// <summary>
        /// 相关类型（业务，任务）
        /// </summary>
        public string RelatedTypeStr => this.RelatedType.GetDescriptionString();
        /// <summary>
        /// 通知范围
        /// </summary>
        public OANotificationRangeType NotificationRange { get; set; }
        /// <summary>
        /// 通知范围
        /// </summary>
        public string NotificationRangeStr => this.NotificationRange.GetDescriptionString();
        /// <summary>
        /// 通知分类Id
        /// </summary>		
        public long NotificationCategoryId { get; set; }
        /// <summary>
        /// 通知分类编码
        /// </summary>
        public string NotificationCategoryCode { get; set; }
        /// <summary>
        /// 通知分类名称
        /// </summary>		
        public string NotificationCategoryName { get; set; }
        /// <summary>
        /// OA系统页面业务配置Id
        /// </summary>
        public long? PageBusinessConfigId { get; set; }
        /// <summary>
        /// 页面业务编码
        /// </summary>		
        public string PageBusinessCode { get; set; }
        /// <summary>
        /// 页面业务名称
        /// </summary>		
        public string PageBusinessName { get; set; }

        /// <summary>
        /// 相关任务分类Id
        /// </summary>		
        public long? RelatedWorkflowCategoryId { get; set; }
        /// <summary>
        /// 相关任务分类Code
        /// </summary>		
        public string RelatedCategoryCode { get; set; }
        /// <summary>
        /// 相关任务分类名称
        /// </summary>		
        public string RelatedCategoryName { get; set; }
        /// <summary>
        /// 相关任务记录编号
        /// </summary>		
        public string RelatedTaskRecordNo { get; set; }
        /// <summary>
        /// 相关业务分类Id
        /// </summary>		
        public long? RelatedBusinessCategoryId { get; set; }
        /// <summary>
        /// 相关业务分类名称
        /// </summary>		
        public string RelatedBusinessCategoryName { get; set; }
        /// <summary>
        /// 相关业务记录Id
        /// </summary>		
        public long? RelatedBusinessRecordId { get; set; }
        /// <summary>
        /// 相关引用编号
        /// </summary>
        public string RelatedReferenceNo { get; set; }
        /// <summary>
        /// 相关业务级别（一般，紧急，有限）
        /// </summary>		
        public OARelatedBusinessTaskLevel RelatedBusinessTaskLevel { get; set; }
        /// <summary>
        /// 相关业务级别（一般，紧急，有限）
        /// </summary>		
        public string RelatedBusinessTaskLevelStr => this.RelatedBusinessTaskLevel.GetDescriptionString();
        /// <summary>
        /// 公司Id
        /// </summary>		
        public int CompanyId { get; set; }
        /// <summary>
        /// 公司名称
        /// </summary>		
        public string CompanyName { get; set; }
        /// <summary>
        /// 部门Id
        /// </summary>		
        public int DepartmentId { get; set; }
        /// <summary>
        /// 部门名称
        /// </summary>		
        public string DepartmentName { get; set; }
        /// <summary>
        /// 允许显示的职位
        /// </summary>		
        public string AllowJobTitle { get; set; }
        /// <summary>
        /// 允许显示的职位字符串
        /// </summary>
        public string AllowJobTitleStr { get; set; }
        /// <summary>
        /// 接收者Id
        /// </summary>		
        public long? ReceiverId { get; set; }
        /// <summary>
        /// 接收者角色（系统、管理员、司机、合伙人）
        /// </summary>		
        public OAPeopleRoleType? ReceiverRole { get; set; }
        /// <summary>
        /// 接收者角色（系统、管理员、司机、合伙人）
        /// </summary>		
        public string ReceiverRoleStr
        {
            get
            {
                if (this.ReceiverRole.HasValue)
                {
                    return this.ReceiverRole.Value.GetDescriptionString();
                }
                else
                {
                    return string.Empty;
                }
            }
        }
        /// <summary>
        /// 接收者姓名
        /// </summary>		
        public string ReceiverName { get; set; }
        /// <summary>
        /// 发起人Id
        /// </summary>		
        public long? OwnerId { get; set; }
        /// <summary>
        /// 发起人角色（系统、管理员、司机、合伙人）
        /// </summary>		
        public OAPeopleRoleType? OwnerRole { get; set; }
        /// <summary>
        /// 发起人角色（系统、管理员、司机、合伙人）
        /// </summary>		
        public string OwnerRoleStr { get {
                if (this.OwnerRole.HasValue)
                {
                    return this.OwnerRole.Value.GetDescriptionString();
                }
                else
                {
                    return string.Empty;
                }
            } }
        /// <summary>
        /// 发起人姓名
        /// </summary>		
        public string OwnerName { get; set; }
        /// <summary>
        /// 任务已移交（移交任务后，源接收人变为参与者，被移交人变为接收者）
        /// </summary>		
        public long IsTransferred { get; set; }
        /// <summary>
        /// 开始时间（预计）
        /// </summary>		
        public DateTime StartTime { get; set; }
        /// <summary>
        /// 结束时间（预计）
        /// </summary>		
        public DateTime EndTime { get; set; }
        /// <summary>
        /// 开始年
        /// </summary>		
        public int StartYear { get; set; }
        /// <summary>
        /// 开始月
        /// </summary>		
        public int StartMonth { get; set; }
        /// <summary>
        /// 实际结束时间
        /// </summary>		
        public DateTime? ActualEndTime { get; set; }
        /// <summary>
        /// 超时时间
        /// </summary>		
        public DateTime? Timeout { get; set; }
        /// <summary>
        /// 超时秒数
        /// </summary>		
        public int? TimeoutSecond { get; set; }
        /// <summary>
        /// 进度百分比
        /// </summary>		
        public double ProcessBar { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>		
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 处理状态
        /// </summary>		
        public OAProcessStatus Status { get; set; }
        /// <summary>
        /// 处理状态
        /// </summary>
        public string StatusStr => this.Status.GetDescriptionString();
        /// <summary>
        /// 处理级别
        /// </summary>		
        public OAProcessLevelType Level { get; set; }
        /// <summary>
        /// 处理级别
        /// </summary>
        public string LevelStr => this.Level.GetDescriptionString();
        /// <summary>
        /// 开始处理时间
        /// </summary>		
        public DateTime? ProcessingTime { get; set; }
        /// <summary>
        /// 结束处理时间
        /// </summary>		
        public DateTime? ProcessedTime { get; set; }
        /// <summary>
        /// 关闭处理备注
        /// </summary>		
        public string CloseRemark { get; set; }
        /// <summary>
        /// 关闭时间
        /// </summary>		
        public DateTime? CloseTime { get; set; }
        /// <summary>
        /// 关闭者Id
        /// </summary>		
        public long? CloseAdminId { get; set; }
        /// <summary>
        /// 关闭者
        /// </summary>		
        public string CloseAdminName { get; set; }
    }
}
